﻿using System.Text.Json;

using ChatGPTIntegrationProject.ExternalAPI.Interfaces.Api;
using ChatGPTIntegrationProject.Service.Interface;

namespace ChatGPTIntegrationProject.Service.Implementation
{
    public class OpenRouter : IOpenRouter
    {
        private IOpenRouterAIApi _openRouterApi;

        public OpenRouter(IOpenRouterAIApi openRouterAIApi)
        {
            _openRouterApi = openRouterAIApi;
        }  
        public async Task<string> GetModelsAsync()
        {
            var response = await _openRouterApi.SupportModels();
            if (response.IsSuccessStatusCode)
            {
                var jsonString = await response.Content.ReadAsStringAsync();
                return jsonString;
            }
            else
            {
                return null;
            }
        }

        public async Task<string> SendMessageAsync(string id, string message)
        {
            return "";
        }
    }
}
